<script setup lang="ts">
import { useUserStore } from './stores/modules/user'
import { useToastStore } from '@/stores/modules/toast'
const toastStore = useToastStore()
const userStore = useUserStore()

if (!userStore.profile?.userId) {
  //设备信息
  const deviceInfo = uni.getSystemInfoSync()
  console.log('设备信息', deviceInfo)

  uni.showToast({
    title: '请登录',
    icon: 'error',
    duration: 1500,
  })
  setTimeout(() => {
    uni.redirectTo({
      url: '/pages/login/login',
    })
  }, 1500)
}
</script>
<template>
  <yz-tips v-if="toastStore.show" :title="toastStore.title"></yz-tips>
</template>
<style lang="scss">
* {
  box-sizing: border-box;
}
html {
  font-size: 14px;
}
#main {
  height: 100vh;
  width: 100vw;
  /* 该机型通知栏高度 */
  padding-top: $top-padding;
}
// button样式，在大多数情况下可用
.button {
  width: 100%;
  height: 46px;
  line-height: 46px;
  font-size: 16px;
  text-align: center;
  background-color: #02bdc6 !important;
  color: #ffffff !important;
  border-radius: 10px;
}
.button::after {
  border: none;
}
// 字体大小样式
.fs_10 {
  font-size: 10px;
}
.fs_12 {
  font-size: 12px;
}
.fs_14 {
  font-size: 14px;
}
.fs_15 {
  font-size: 15px;
}
.fs_16 {
  font-size: 16px;
}
.fs_18 {
  font-size: 18px;
}
.fs_20 {
  font-size: 20px;
}
.fs_24 {
  font-size: 24px;
}
.fs_30 {
  font-size: 30px;
}
.fw_400 {
  font-weight: 400;
}
.fw_600 {
  font-weight: 600;
}
.fw_700 {
  font-weight: 700;
}
// icon样式
.icon {
  width: 24px;
  height: 24px;
}
.mini_Icon {
  width: 20px;
  height: 20px;
}
.small_Icon {
  width: 24px;
  height: 24px;
}
.medium_Icon {
  width: 32px;
  height: 32px;
}
.large_Icon {
  width: 36px;
  height: 36px;
}

.uni-input-placeholder {
  color: #ccccd3;
  font-size: 14px;
}
</style>
